package org.example.boot.ioc.pack;

import jakarta.annotation.Resource;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;
@Data
@Component
@Slf4j
public class DemoD {
    //byType+byName
//    @Autowired
//    @Qualifier(value = "demoC1")
    @Resource //byNmae+byType 先按照名称赋值，如果名称不存在，按照类型赋值
    private DemoC demoC2;
}
